home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Today (Latin America) Volume 1 #6 / CD-ROM Today 6 Latam.iso / referenc / evol / database.dxr / 00100_DoTrace.ls < prev    next >
Encoding:
Text File  |  1996-11-08  |  1.1 KB  |  37 lines

  1. on UpdateTrace articleIndex
  2.   global gTraceMem, gDBtrace, wColor, gbTraceLine, gColorList
  3.   set aName to the name of member articleIndex of castLib 2
  4.   set aPair to [wColor, aName]
  5.   add(gDBtrace, aPair)
  6.   AddToTrace(aPair)
  7.   if gbTraceLine then
  8.     delete line gbTraceLine of field gTraceMem
  9.     deleteAt(gDBtrace, gbTraceLine)
  10.     set gbTraceLine to 0
  11.   end if
  12.   if the number of lines in field gTraceMem > 14 then
  13.     delete line 1 of field gTraceMem
  14.     deleteAt(gDBtrace, 1)
  15.   end if
  16. end
  17.  
  18. on AddToTrace traceE
  19.   global gTraceMem, gColorList
  20.   set oldwc to the number of words in field gTraceMem
  21.   set TraceFlag to getAt(traceE, 1)
  22.   if TraceFlag <= 4 then
  23.     set NextEntry to "- " & getAt(traceE, 2) & RETURN
  24.   else
  25.     set NextEntry to "-       " & getAt(traceE, 2) & RETURN
  26.   end if
  27.   put NextEntry after field gTraceMem
  28.   set wc to the number of words in field gTraceMem
  29.   if getAt(traceE, 2) = "contents" then
  30.     set the foreColor of word wc of field gTraceMem to 254
  31.   else
  32.     repeat with K = oldwc + 2 to wc
  33.       set the foreColor of word K of field gTraceMem to getAt(gColorList, TraceFlag)
  34.     end repeat
  35.   end if
  36. end
  37.